#include<stdio.h>
#include<string.h>
int main(int argc, char const *argv[])
{
    FILE *fp=fopen("hello.txt","a");
    if(NULL==fp){
        printf("文件创建失败\n");
        return -1;
    }
    char buf[128]="gjgjjjjjjjgggg";
    for (size_t i = 0; i <strlen(buf); i++)
    {
        fputc(buf[i],fp);
    }
    fclose(fp);

    fp=fopen("hello.txt","r");
    if (NULL==fp)
    {
        printf("文件创建失败\n");
        return -1;
    }
    printf("读取到字符%c\n",fgetc(fp));
    fclose(fp);
    return 0;
}
